PageRenderTime 58ms CodeModel.GetById 31ms RepoModel.GetById 1ms app.codeStats 0ms

/test/Sema/heinous-extensions-on.c

http://github.com/nobled/clang
C | 9 lines | 5 code | 1 blank | 3 comment | 0 complexity | 9329d7b03f49ef2bd6c2602405a4624f MD5 | raw file
  1. // RUN: %clang_cc1 %s -verify -fheinous-gnu-extensions
  2. void foo() {
  3. int a;
  4. // PR3788
  5. asm("nop" : : "m"((int)(a))); // expected-warning {{cast in a inline asm context requiring an l-value}}
  6. // PR3794
  7. asm("nop" : "=r"((unsigned)a)); // expected-warning {{cast in a inline asm context requiring an l-value}}
  8. }